home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / x / volume10 / contool / patch1 < prev    next >
Encoding:
Internet Message Format  |  1990-10-29  |  11.9 KB

  1. Path: uunet!cs.utexas.edu!sun-barr!newstop!sun!melmac.harris-atd.com
  2. From: chuck@melmac.harris-atd.com (Chuck Musciano)
  3. Newsgroups: comp.sources.x
  4. Subject: v10i040: contool -- replacement for 'cmdtool -C', Patch1, Part01/01
  5. Message-ID: <144348@sun.Eng.Sun.COM>
  6. Date: 30 Oct 90 06:29:07 GMT
  7. References: <csx-10i040:contool@uunet.UU.NET>
  8. Sender: news@sun.Eng.Sun.COM
  9. Lines: 358
  10. Approved: argv@sun.com
  11.  
  12. Submitted-by: chuck@melmac.harris-atd.com (Chuck Musciano)
  13. Posting-number: Volume 10, Issue 40
  14. Archive-name: contool/patch1
  15. Patch-To: contool: Volume 10, Issue 34-39
  16.  
  17.      This is patch 1 for contool 3.0, my alternate console tool for
  18. workstations running X Windows.
  19.  
  20.      This patch fixes a few minor bugs, including:
  21.      
  22.      *    Dialog boxes now open and close correctly under window managers
  23.          other than olwm.
  24.          
  25.      *    Handling of custom icons is now fixed.
  26.      
  27.      *    Filter files originally created for contool 1.0 now work with
  28.          version 3.0.
  29.      
  30.      *    The "clean" target in the Makefile is fixed.
  31.     
  32. Also, this patch creates an Imakefile for use with xmkmf and imake.
  33.  
  34.  
  35. Chuck Musciano                ARPA  : chuck@trantor.harris-atd.com
  36. Harris Corporation             Usenet: ...!uunet!x102a!trantor!chuck
  37. PO Box 37, MS 3A/1912            AT&T  : (407) 727-6131
  38. Melbourne, FL 32902            FAX   : (407) 729-2537
  39.  
  40. A good newspaper is never good enough,
  41.     but a lousy newspaper is a joy forever.        -- Garrison Keillor
  42.  
  43. #! /bin/sh
  44. # This is a shell archive.  Remove anything before this line, then unpack
  45. # it by saving it into a file and typing "sh file".  To overwrite existing
  46. # files, type "sh file -c".  You can also feed this as standard input via
  47. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  48. # will see the following message at the end:
  49. #        "End of shell archive."
  50. # Contents:  patch
  51. # Wrapped by chuck@melmac on Thu Oct 18 10:53:38 1990
  52. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  53. if test -f 'patch' -a "${1}" != "-c" ; then 
  54.   echo shar: Will not clobber existing file \"'patch'\"
  55. else
  56. echo shar: Extracting \"'patch'\" \(9176 characters\)
  57. sed "s/^X//" >'patch' <<'END_OF_FILE'
  58. X*** Makefile.orig    Thu Oct 18 10:48:43 1990
  59. X--- Makefile    Fri Aug 31 14:15:32 1990
  60. X***************
  61. X*** 46,52 ****
  62. X      cp -p contool.man $(MAN)/contool.$(MANEXT)
  63. X  
  64. X  clean:
  65. X!     rm -f *~ $(OFILES) contool core
  66. X  
  67. X  #dependencies
  68. X  
  69. X--- 46,52 ----
  70. X      cp -p contool.man $(MAN)/contool.$(MANEXT)
  71. X  
  72. X  clean:
  73. X!     rm -f *~ *.o contool core
  74. X  
  75. X  #dependencies
  76. X  
  77. X*** Imakefile.orig    Thu Oct 18 10:48:45 1990
  78. X--- Imakefile    Thu Oct 18 10:27:16 1990
  79. X***************
  80. X*** 0 ****
  81. X--- 1,22 ----
  82. X+ OPENWINHOME    = /usr/openwin
  83. X+ 
  84. X+ HELPDIR        = /usr/local/lib/help
  85. X+ 
  86. X+ LOCAL_LIBRARIES = -lxview -lolgx $(XLIB)
  87. X+ 
  88. X+ LDOPTIONS    = -L$(OPENWINHOME)/lib
  89. X+ 
  90. X+ CFLAGS        = -O -I$(OPENWINHOME)/include
  91. X+ 
  92. X+ SRCS        = contool.c contool_ui.c error.c expand.c filters.c \
  93. X+           load.c load_icon.c logging.c misc.c parse.y props.c \
  94. X+           regexp.c store.c window_misc.c
  95. X+ 
  96. X+ OBJS        = contool.o contool_ui.o error.o expand.o filters.o \
  97. X+           load.o load_icon.o logging.o misc.o parse.o props.o \
  98. X+           regexp.o store.o window_misc.o
  99. X+ 
  100. X+ ComplexProgramTarget(contool)
  101. X+ 
  102. X+ install:: install.man
  103. X+     $(INSTALL) -c $(INSTMANFLAGS) contool.info $(HELPDIR)/contool.info
  104. X*** README.orig    Thu Oct 18 10:48:46 1990
  105. X--- README    Thu Oct 18 10:22:55 1990
  106. X***************
  107. X*** 171,173 ****
  108. X--- 171,180 ----
  109. X                  Reworked console overflow handling,
  110. X                     courtesy of Matt Cohen
  111. X                     (sysnmc@magic706.chron.com).
  112. X+     3.0a            Allowed reading of 1.0 filter files.
  113. X+                 Fixed handling of custom default icon
  114. X+                    when blinking stops.
  115. X+                 Tweaked Makefile slightly.
  116. X+                 Fixed handling of dialog boxes under
  117. X+                    window managers other than olwm.
  118. X+                 Add Imakefile.
  119. X*** contool.man.orig    Thu Oct 18 10:48:47 1990
  120. X--- contool.man    Mon Oct  1 14:35:10 1990
  121. X***************
  122. X*** 16,22 ****
  123. X  \f2Contool\fP must be run under either Open Windows or X Windows.
  124. X  It accepts the standard Open Windows command line options.
  125. X  .SH OPTIONS
  126. X! .IP "\fB\\(hyf\fP \fIfile\fP"
  127. X  specifies an alternate configuration file.  \f2Contool\fP normally
  128. X  reads its configuration information from ~/.contool.
  129. X  .IP "\fB\\(hyl\fP"
  130. X--- 16,22 ----
  131. X  \f2Contool\fP must be run under either Open Windows or X Windows.
  132. X  It accepts the standard Open Windows command line options.
  133. X  .SH OPTIONS
  134. X! .IP "\fB\\(hyc\fP \fIfile\fP"
  135. X  specifies an alternate configuration file.  \f2Contool\fP normally
  136. X  reads its configuration information from ~/.contool.
  137. X  .IP "\fB\\(hyl\fP"
  138. X***************
  139. X*** 46,52 ****
  140. X  filters from the file.
  141. X  .IP ""
  142. X  The text field contains the path of the configuration file.  By default,
  143. X! this is either ~/.contool, or the value of the \fB-f\fP option (above).
  144. X  This text field provides file name completion, like \f2csh\fP(1), by typing
  145. X  a space or carriage return.
  146. X  .IP ""
  147. X--- 46,52 ----
  148. X  filters from the file.
  149. X  .IP ""
  150. X  The text field contains the path of the configuration file.  By default,
  151. X! this is either ~/.contool, or the value of the \fB-c\fP option (above).
  152. X  This text field provides file name completion, like \f2csh\fP(1), by typing
  153. X  a space or carriage return.
  154. X  .IP ""
  155. X***************
  156. X*** 56,64 ****
  157. X  discarded.  If \f2contool\fP was in the middle of filtering a multi-line message,
  158. X  that filtering action is terminated.
  159. X  .IP ""
  160. X! \f2Contool\fP can read files created by versions 2.0, 2.1, 2.2, and 3.0 of
  161. X! \f2contool\fP.  Files used by version 1.0 will need to be manually converted
  162. X! by first reading and writing them with any 2.x release of \f2contool\fP.
  163. X  .IP "\fBFile: Save Configuration...\fP"
  164. X  is analogous to the \fBLoad Configuration\fP operation, bringing up a dialog
  165. X  box containing a non-exclusive setting, a text field, and a \fBSave\fP
  166. X--- 56,64 ----
  167. X  discarded.  If \f2contool\fP was in the middle of filtering a multi-line message,
  168. X  that filtering action is terminated.
  169. X  .IP ""
  170. X! \f2Contool\fP can read files created by all previous versions of
  171. X! \f2contool\fP.  Files written by \f2contool\fP cannot be read by any previous
  172. X! version.
  173. X  .IP "\fBFile: Save Configuration...\fP"
  174. X  is analogous to the \fBLoad Configuration\fP operation, bringing up a dialog
  175. X  box containing a non-exclusive setting, a text field, and a \fBSave\fP
  176. X*** contool.c.orig    Thu Oct 18 10:48:50 1990
  177. X--- contool.c    Thu Oct 11 10:38:59 1990
  178. X***************
  179. X*** 365,371 ****
  180. X      event_in_progress = TRUE;
  181. X      if (event_action(event) == ACTION_OPEN && blinking) {
  182. X         notify_set_itimer_func(contool_base->base, blink_proc, ITIMER_REAL, NULL, NULL);
  183. X!        change_icon(good, good = default_good_icon);
  184. X         blinking = FALSE;
  185. X         }
  186. X      event_in_progress = FALSE;
  187. X--- 365,371 ----
  188. X      event_in_progress = TRUE;
  189. X      if (event_action(event) == ACTION_OPEN && blinking) {
  190. X         notify_set_itimer_func(contool_base->base, blink_proc, ITIMER_REAL, NULL, NULL);
  191. X!        change_icon(good, good == default_good_icon);
  192. X         blinking = FALSE;
  193. X         }
  194. X      event_in_progress = FALSE;
  195. X*** contool_ui.c.orig    Thu Oct 18 10:48:52 1990
  196. X--- contool_ui.c    Thu Oct 18 10:40:18 1990
  197. X***************
  198. X*** 307,313 ****
  199. X          XV_KEY_DATA, INSTANCE, ip,
  200. X          XV_WIDTH, 575,
  201. X          XV_HEIGHT, 246,
  202. X!         XV_LABEL, "Contool 3.0",
  203. X          FRAME_CLOSED, FALSE,
  204. X          FRAME_SHOW_FOOTER, TRUE,
  205. X          FRAME_SHOW_RESIZE_CORNER, TRUE,
  206. X--- 307,313 ----
  207. X          XV_KEY_DATA, INSTANCE, ip,
  208. X          XV_WIDTH, 575,
  209. X          XV_HEIGHT, 246,
  210. X!         XV_LABEL, "Contool 3.0a",
  211. X          FRAME_CLOSED, FALSE,
  212. X          FRAME_SHOW_FOOTER, TRUE,
  213. X          FRAME_SHOW_RESIZE_CORNER, TRUE,
  214. X*** lex.c.orig    Thu Oct 18 10:48:58 1990
  215. X--- lex.c    Fri Aug 31 13:58:54 1990
  216. X***************
  217. X*** 49,54 ****
  218. X--- 49,55 ----
  219. X                   {"nostamp",              NOSTAMP},
  220. X                   {"open",                 OPEN},
  221. X                   {"print",                PRINT},
  222. X+                  {"quiet",                QUIET},
  223. X                   {"save",                 SAVE},
  224. X                   {"stamp",                STAMP},
  225. X                   {"timestamp",            TIMESTAMP},
  226. X*** parse.y.orig    Thu Oct 18 10:49:03 1990
  227. X--- parse.y    Fri Aug 31 14:08:54 1990
  228. X***************
  229. X*** 53,63 ****
  230. X  
  231. X  %token        BEEP CHECK_ICON COMMAND COMMENT DEFAULTS DELETE DISPLAY FILTERS
  232. X          FLASH FLASH_ICON GOOD_ICON IGNORE LOG_BEFORE_FILTERING LOG_FILE
  233. X!         MATCH NO NOFLASH NOOPEN NOSTAMP OPEN PRINT SAVE STAMP TIMESTAMP TO YES
  234. X  
  235. X  %type    <ival>    beep flash old_flash old_open old_stamp open stamp yes_no
  236. X  %type    <cpval>    command old_end_string string
  237. X! %type    <fval>    filter filter_list old_filter old_filter_list old_ignore old_save
  238. X  
  239. X  %%
  240. X  
  241. X--- 53,63 ----
  242. X  
  243. X  %token        BEEP CHECK_ICON COMMAND COMMENT DEFAULTS DELETE DISPLAY FILTERS
  244. X          FLASH FLASH_ICON GOOD_ICON IGNORE LOG_BEFORE_FILTERING LOG_FILE
  245. X!         MATCH NO NOFLASH NOOPEN NOSTAMP OPEN PRINT QUIET SAVE STAMP TIMESTAMP TO YES
  246. X  
  247. X  %type    <ival>    beep flash old_flash old_open old_stamp open stamp yes_no
  248. X  %type    <cpval>    command old_end_string string
  249. X! %type    <fval>    filter filter_list old_filter old_filter_list old_ignore old_quiet old_save
  250. X  
  251. X  %%
  252. X  
  253. X***************
  254. X*** 86,91 ****
  255. X--- 86,92 ----
  256. X  
  257. X  old_filter    :    old_save
  258. X          |    old_ignore
  259. X+         |    old_quiet
  260. X          ;
  261. X  
  262. X  old_save    :    SAVE beep old_flash old_open old_stamp STRING old_end_string
  263. X***************
  264. X*** 121,126 ****
  265. X--- 122,150 ----
  266. X                        f->flash    = FALSE;
  267. X                        f->open     = FALSE;
  268. X                        f->stamp    = FALSE;
  269. X+                       f->start    = $2;
  270. X+                       f->stop     = $3;
  271. X+                       f->start_re = NULL;
  272. X+                       f->stop_re  = NULL;
  273. X+                       f->command  = NULL;
  274. X+                       f->comment  = NULL;
  275. X+                       f->next     = NULL;
  276. X+                       if (msg = compile_exp(f, f->start, f->stop))
  277. X+                          yyerror(msg);
  278. X+                       $$ = f;
  279. X+                     }
  280. X+         ;
  281. X+ 
  282. X+ old_quiet    :    QUIET STRING old_end_string
  283. X+                     { Filter    *f;
  284. X+                       char        *msg;
  285. X+                     
  286. X+                       f = (Filter *) malloc(sizeof(Filter));
  287. X+                       f->save     = TRUE;
  288. X+                       f->beep     = 0;
  289. X+                       f->flash    = FALSE;
  290. X+                       f->open     = FALSE;
  291. X+                       f->stamp    = TRUE;
  292. X                        f->start    = $2;
  293. X                        f->stop     = $3;
  294. X                        f->start_re = NULL;
  295. X*** patchlevel.h.orig    Thu Oct 18 10:49:04 1990
  296. X--- patchlevel.h    Tue Sep 18 15:06:44 1990
  297. X***************
  298. X*** 3,6 ****
  299. X--- 3,8 ----
  300. X  /*    Patch        Comments                    */
  301. X  /*      0        Initial release for XView            */
  302. X  /*                                    */
  303. X+ /*      1        Bug fixes; see README for details        */
  304. X+ /*                                    */
  305. X  /************************************************************************/
  306. X*** window_misc.c.orig    Thu Oct 18 10:49:09 1990
  307. X--- window_misc.c    Thu Oct 18 09:48:19 1990
  308. X***************
  309. X*** 28,33 ****
  310. X--- 28,34 ----
  311. X  #include    <xview/xview.h>
  312. X  #include    <xview/panel.h>
  313. X  #include    <xview/xv_xrect.h>
  314. X+ #include    <X11/Xutil.h>
  315. X  
  316. X  #include    "manifest.h"
  317. X  #include    "contool_ui.h"
  318. X***************
  319. X*** 80,86 ****
  320. X  Xv_opaque    base;
  321. X  Xv_opaque    dialog;
  322. X  
  323. X! {    Rect    br, dr, sr;
  324. X  
  325. X      sr = *((Rect *) xv_get(base, WIN_SCREEN_RECT));
  326. X      frame_get_rect(base, &br);
  327. X--- 81,88 ----
  328. X  Xv_opaque    base;
  329. X  Xv_opaque    dialog;
  330. X  
  331. X! {    Rect        br, dr, sr;
  332. X!     XWMHints    *hints;
  333. X  
  334. X      sr = *((Rect *) xv_get(base, WIN_SCREEN_RECT));
  335. X      frame_get_rect(base, &br);
  336. X***************
  337. X*** 98,101 ****
  338. X--- 100,109 ----
  339. X         dr.r_top = br.r_top + 32;
  340. X         }
  341. X      frame_set_rect(dialog, &dr);
  342. X+ 
  343. X+     hints = XGetWMHints(xv_get(dialog, XV_DISPLAY), xv_get(dialog, XV_XID));
  344. X+     hints->flags |= StateHint;
  345. X+     hints->initial_state = NormalState;
  346. X+     XSetWMHints(xv_get(dialog, XV_DISPLAY), xv_get(dialog, XV_XID), hints);
  347. X+     XFree(hints);
  348. X  }
  349. END_OF_FILE
  350. if test 9176 -ne `wc -c <'patch'`; then
  351.     echo shar: \"'patch'\" unpacked with wrong size!
  352. fi
  353. # end of 'patch'
  354. fi
  355. echo shar: End of shell archive.
  356. exit 0
  357.  
  358. Chuck Musciano                ARPA  : chuck@trantor.harris-atd.com
  359. Harris Corporation             Usenet: ...!uunet!x102a!trantor!chuck
  360. PO Box 37, MS 3A/1912            AT&T  : (407) 727-6131
  361. Melbourne, FL 32902            FAX   : (407) 729-2537
  362.  
  363. A good newspaper is never good enough,
  364.     but a lousy newspaper is a joy forever.        -- Garrison Keillor
  365.  
  366. dan
  367. ----------------------------------------------------
  368. O'Reilly && Associates   argv@sun.com / argv@ora.com
  369. Opinions expressed reflect those of the author only.
  370.